const { DataTypes, STRING, INTEGER } = require("sequelize");
const sequelize = require("../db/seq");
const User = sequelize.define("user", {
  id: {
    type: DataTypes.INTEGER,
    autoIncrement: true,
    primaryKey: true,
  },
  username: {
    type: STRING,
  },
  password: {
    type: STRING,
  },
  createTime: {
    type: STRING,
  },
  lastLoginTime: {
    type: STRING,
  },
  loginType: {
    type: INTEGER,
  },
  status: {
    type: INTEGER,
  },
  roleId: {
    type: INTEGER,
  },
  ip_address: {
    type: STRING,
  },
  ip: {
    type: STRING,
  },
  browser: {
    type: STRING,
  },
  nickname: {
    type: STRING,
  },
  avatar: {
    type: STRING,
  },
  intro: {
    type: STRING,
  },
  titleImg: {
    type: STRING,
  },
},{
    tableName:"bl-user",
    timestamps:false,
});

module.exports = User
